<%@page import="com.zx.exp6.bean.Message"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>show message page</title>

</head>

<body>
	<%
		List<Message> messageList = (List<Message>)application.getAttribute("messageList");
	%>
	<table>
		<tr>
			<th>标题</th>
			<th>内容</th>
			<th>发布者</th>
		</tr>
		<%
			for(Message message : messageList){
		%>
			<tr>
				<td><%=message.getTitle()%></td>
				<td><%=message.getContent()%></td>
				<td><%=message.getUsername()%></td>
			</tr>
		<%
			}
		%>
	</table>
	<a href="messageBoard.jsp">继续留言</a>
</body>
</html>
